The present invention relates to digital data compression, and more particularly to a method of refining a pixel-based segmentation mask derived by upsampling a block-based segmentation mask representing an image.
An image having Hxc3x97V pixels may be divided into a plurality of blocks, each having dimensions of Pxc3x97Q pixels. Each block may be classified into one of N classes. This provides a decimated or block-based segmentation mask as shown in FIG. 1 where for ease of illustration there are two classes, I and II, and each pixel of the mask represents a block of Pxc3x97Q pixels of the full resolution image. When the decimated segmentation mask is upsampled to produce a pixel-based segmentation mask having the same resolution as the full resolution image, the result is a blocky pixel-based segmentation mask, as shown in FIG. 2.
What is desired is a method for refining the blocky pixel-based segmentation mask into a smoother pixel-based segmentation mask.
Accordingly the present invention provides a method of refining a pixel-based segmentation mask derived by upsampling a block-based segmentation mask for an image to provide a full resolution image without block artifacts. For each block of the block-based segmentation mask a feature vector is obtained which defines one of a plurality of classes to which the block belongs. From the corresponding pixel-based segmentation mask a mean and covariance is defined for each class. For each pixel in the pixel-based segmentation mask the means, covariances and feature vectors are used to determine a likelihood that the pixel belongs to each class. Then a one-pixel wide boundary is defined at each border between adjacent classes in the block-based segmentation mask, and the resulting boundary block xe2x80x9cpixelsxe2x80x9d are upsampled to corresponding boundary pixels for the pixel-based segmentation mask. The true class for each boundary pixel is determined, and the pixel-based segmentation mask is updated accordingly to smooth blockiness artifacts at the borders between classes.